#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Desc    : 
@File    ：02_multi_args.py
@Author  ：edencpchen
@Date    ：2025/11/11 06:32 
'''


def test(a, b, *args, **kwargs):
    print(a, type(a))
    print(b, type(b))
    print(args, type(args))
    print(kwargs, type(kwargs))


test(11, 22, 33, 44, 55, 66, name='顾安', address='长沙')


def test_2(name, age, addr):
    print(f'{name=}, {age=}, {addr=}')


user = {
    "name": "edenChen",
    "age": 20,
    "addr": "西安市长安区"
}

test_2(*user)  # 这样传入的入参是user的keySet 。name='name', age='age', addr='addr'
test_2(**user)  # 这样传入的入参是user的字典 name='edenChen', age=20, addr='西安市长安区'
# *  是对列表、集合、元祖 进行拆包
# ** 是对元祖进行拆包

a = 1
b = a
print(b)  # 1
a = 2
print(a)  # 2
print(b)  # 1

aa = [1, 2, 3]
bb = aa
print(bb)  # [1,2,3]
aa.append(4)
print(aa)  # [1,2,3，4]
print(bb)  # [1,2,3，4]
